package vip.xiaonuo.sys.fymodule.order.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * <p>
 * 订单
 * </p>
 *
 * @author wangy
 * @since 2025-06-18
 */
@Data
@TableName("sxo_order")
@Schema(name = "SxoOrder对象", description = "订单")
public class SxoOrder implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "自增id")
    @TableId(value = "id", type = IdType.AUTO)
    private String id;

    @Schema(description = "订单号")
    @TableField("order_no")
    private String orderNo;

    @Schema(description = "用户id")
    @TableField("user_id")
    private String userId;

    @Schema(description = "店铺id")
    @TableField("shop_id")
    private String shopId;

    @Schema(description = "仓库id")
    @TableField("warehouse_id")
    private String warehouseId;

    @Schema(description = "支付方式id")
    @TableField("payment_id")
    private String paymentId;

    @Schema(description = "系统类型（默认 default, 其他按照SYSTEM_TYPE常量类型）")
    @TableField("system_type")
    private String systemType;

    @Schema(description = "订单状态（0待确认, 1已确认/待支付, 2已支付/待发货, 3已发货/待收货, 4已完成, 5已取消, 6已关闭）")
    @TableField("status")
    private Integer status;

    @Schema(description = "支付状态（0未支付, 1已支付, 2已退款, 3部分退款）")
    @TableField("pay_status")
    private Integer payStatus;

    @Schema(description = "扩展展示数据")
    @TableField("extension_data")
    private String extensionData;

    @Schema(description = "购买商品总数量")
    @TableField("buy_number_count")
    private Integer buyNumberCount;

    @Schema(description = "增加的金额")
    @TableField("increase_price")
    private BigDecimal increasePrice;

    @Schema(description = "优惠金额")
    @TableField("preferential_price")
    private BigDecimal preferentialPrice;

    @Schema(description = "订单单价")
    @TableField("price")
    private BigDecimal price;

    @Schema(description = "订单总价(订单最终价格)")
    @TableField("total_price")
    private BigDecimal totalPrice;

    @Schema(description = "已支付金额")
    @TableField("pay_price")
    private BigDecimal payPrice;

    @Schema(description = "退款金额")
    @TableField("refund_price")
    private BigDecimal refundPrice;

    @Schema(description = "退货数量")
    @TableField("returned_quantity")
    private Integer returnedQuantity;

    @Schema(description = "客户端类型（pc, h5, ios, android, alipay, weixin, baidu）取APPLICATION_CLIENT_TYPE常量值")
    @TableField("client_type")
    private String clientType;

    @Schema(description = "订单模式（0销售型, 1展示型, 2自提点, 3虚拟销售）")
    @TableField("order_model")
    private Integer orderModel;

    @Schema(description = "是否线下支付（0否，1是）")
    @TableField("is_under_line")
    private Integer isUnderLine;

    @Schema(description = "用户备注")
    @TableField("user_note")
    private String userNote;

    @Schema(description = "支付时间")
    @TableField("pay_time")
    private String payTime;

    @Schema(description = "确认时间")
    @TableField("confirm_time")
    private String confirmTime;

    @Schema(description = "发货时间")
    @TableField("delivery_time")
    private String deliveryTime;

    @Schema(description = "取消时间")
    @TableField("cancel_time")
    private String cancelTime;

    @Schema(description = "收货时间")
    @TableField("collect_time")
    private String collectTime;

    @Schema(description = "关闭时间")
    @TableField("close_time")
    private String closeTime;

    @Schema(description = "评论时间")
    @TableField("comments_time")
    private String commentsTime;

    @Schema(description = "是否已评论（0否, 大于0评论时间）")
    @TableField("is_comments")
    private String isComments;

    @Schema(description = "用户是否已评论（0否, 大于0评论时间）")
    @TableField("user_is_comments")
    private String userIsComments;

    @Schema(description = "是否已删除（0否, 大于0删除时间）")
    @TableField("is_delete_time")
    private String isDeleteTime;

    @Schema(description = "用户是否已删除（0否, 大于0删除时间）")
    @TableField("user_is_delete_time")
    private String userIsDeleteTime;

    @Schema(description = "店铺是否已删除（0否, 大于0删除时间）")
    @TableField("shop_is_delete_time")
    private String shopIsDeleteTime;

    @Schema(description = "添加时间")
    @TableField("add_time")
    private String addTime;

    @Schema(description = "更新时间")
    @TableField("upd_time")
    private String updTime;
}
